#!/bin/bash
start_time=$(date +%s) # %s可以计算的是1970年以来的秒数

#mkdir -p ../runlogs/
#mkdir -p ../runlog/
path=../data/ebs_segment_io_records/AY283G_2022-01-01_00:00:00_2022-01-02_00:00:00/device/

filename="$1"
data_path=${path}${filename}
data_name=${filename%.*}

cd ../build/
for executable_file in trace_allGet trace_allPut trace_realRun ; do
  expr_put=../evaluation/${data_name}_${executable_file}_16_put.txt
  if [ -f ${expr_put} ]; then
    rm ${expr_put}
  fi
  ./${executable_file} -f ${data_path} -k 16 -v 64 -d ../ssd/db_${data_name}_${executable_file} -m 7 -w > ${expr_put}
#    ./a_trace_allGet -f ../data/ebs_segment_io_records/AY283G_2022-01-01_00:00:00_2022-01-02_00:00:00/device/111969901601639.csv -k 16 -v 64 -d ../ssd/db_111969901601639_trace_realRun -m 7 -w > ../evaluation/111969901601639_trace_allGet_put.txt

done


end_time=$(date +%s)
cost_time=$((end_time-start_time))
#echo "$0" "运行时间：$((cost_time/60))min $((cost_time%60))s"